package day04;

import java.util.ArrayList;
import java.util.List;

public class Demo10 {

	public static void main(String[] args) {
		
		
		List<String> list =new ArrayList<String>();
		list.add("Tom");
		list.add("Jerry");
		list.add("Jhon");
		System.out.println(list);
		
		list.add(1, "zhangsan");
		System.out.println(list);
		
		String name=list.remove(list.size()-1);
		System.out.println(name);
		System.out.println(list);
		
	}

}
